#include"ShareMemory.hpp"

int main()
{
    //创建共享内存
    shm.CreateShm();

    //挂接共享内存
    shm.AttachShm();

    //获取地址
    char *out = (char *)shm.GetAddr();

    while(true)
    {  
        //不断获取内存资源
        printf("%s\n",out);
        sleep(5);
    }

    
    //取消挂接
    shm.DetachShm();

    //删除共享内存
    shm.DeleteShm();

    return 0;
}